
module.exports = function (sequelize, DataTypes) {

  const prize = sequelize.define('prize', {
      name: DataTypes.STRING(100),
      degree: DataTypes.STRING(100),
      time: DataTypes.DATE,
      content:DataTypes.STRING(300)
    }
  );
  prize.associate = (models)=>{
    prize.belongsTo(models.student, {
      as: 'student'
    })
  }
  return prize;
}